#include <QDebug>
#include "purgatory.h"

Purgatory::Purgatory()
{
}

Purgatory::~Purgatory()
{

}

void Purgatory::purge(Object* o, ot::ObjectType t)
{
    objects[t].push_back(o);
}

Object* Purgatory::package()
{
    if(objects[ot::PACKAGE].empty()) return NULL;
    else
    {
        Object* p= objects[ot::PACKAGE].front();
        objects[ot::PACKAGE].pop_front();
        return p;
    }
}

Object* Purgatory::bullet()
{
    if(objects[ot::BULLET].empty()) return NULL;
    else
    {
        Object* p= objects[ot::BULLET].front();
        objects[ot::BULLET].pop_front();
        return p;
    }
}

